/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.logistics.entity.overseaswarehouse;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.cars.Tcar;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 海外仓Entity
 * @author LV
 * @version 2021-03-10
 */
@Table(name="t_overseas_warehouse_detail", alias="a", columns={
		@Column(name="overseas_warehouse_detail_id", attrName="overseasWarehouseDetailId", label="海外仓明细ID", isPK=true),
		@Column(name="row_number", attrName="rowNumber", label="服务订单行号"),
		@Column(name="car_id", attrName="carId", label="车辆"),
		@Column(name="model", attrName="model", label="车型"),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="engine_number", attrName="engineNumber", label="发动机号"),
		@Column(name="color", attrName="color", label="车身颜色"),
		@Column(name="production_date", attrName="productionDate", label="生产日期"),
		@Column(name="factory", attrName="factory", label="原厂地"),
		@Column(name="tire_size", attrName="tireSize", label="轮胎尺寸"),
		@Column(name="seat_number", attrName="seatNumber", label="座位数"),
		@Column(name="milage", attrName="milage", label="里程数"),
		@Column(name="warehousestatus", attrName="warehousestatus", label="状态"),
		@Column(name="payment_order_code", attrName="paymentOrderCode", label="TT付款单号"),
		@Column(name="overseas_warehouse_id", attrName="overseasWarehouseId.overseasWarehouseId", label="海外仓ID"),
	}, joinTable={
        @JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= Tcar.class, attrName="tcar", alias="b",
                on="b.car_id = a.car_id", columns={
                @Column(name="car_id", label="车辆编码", isPK=true),
                @Column(name="car_name", label="车辆名称", isQuery=false),
        }),
}, orderBy="a.overseas_warehouse_detail_id ASC"
)
public class OverseasWarehouseDetail extends DataEntity<OverseasWarehouseDetail> {
	
	private static final long serialVersionUID = 1L;
	private String overseasWarehouseDetailId;		// 海外仓明细ID
	private Long rowNumber;		// 服务订单行号
	private String carId;		// 车辆
	private String carName;		// 车辆
	private String model;		// 车型
	private String frameNumber;		// 车架号
	private String engineNumber;		// 发动机号
	private String color;		// 车身颜色
	private Date productionDate;		// 生产日期
	private String factory;		// 原厂地
	private String tireSize;		// 轮胎尺寸
	private String seatNumber;		// 座位数
	private String milage;		// 里程数
	private String paymentOrderCode;		// TT付款单号
	private OverseasWarehouse overseasWarehouseId;		// 海外仓ID 父类
    private String warehousestatus;
    private String frameNumberOld;
    private Tcar tcar;
	
	public OverseasWarehouseDetail() {
		this(null);
	}

	public OverseasWarehouseDetail(OverseasWarehouse overseasWarehouseId){
		this.overseasWarehouseId = overseasWarehouseId;
	}
	
	public String getOverseasWarehouseDetailId() {
		return overseasWarehouseDetailId;
	}

	public void setOverseasWarehouseDetailId(String overseasWarehouseDetailId) {
		this.overseasWarehouseDetailId = overseasWarehouseDetailId;
	}
	
	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}
	
	@Length(min=0, max=64, message="车辆长度不能超过 64 个字符")
	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}
	
	@Length(min=0, max=100, message="车型长度不能超过 100 个字符")
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	@NotBlank(message="车架号不能为空")
	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}
	
	@NotBlank(message="发动机号不能为空")
	@Length(min=0, max=100, message="发动机号长度不能超过 100 个字符")
	public String getEngineNumber() {
		return engineNumber;
	}

	public void setEngineNumber(String engineNumber) {
		this.engineNumber = engineNumber;
	}
	
	@NotBlank(message="车身颜色不能为空")
	@Length(min=0, max=100, message="车身颜色长度不能超过 100 个字符")
	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd")
	@NotNull(message="生产日期不能为空")
	public Date getProductionDate() {
		return productionDate;
	}

	public void setProductionDate(Date productionDate) {
		this.productionDate = productionDate;
	}
	
	@NotBlank(message="原厂地不能为空")
	@Length(min=0, max=100, message="原厂地长度不能超过 100 个字符")
	public String getFactory() {
		return factory;
	}

	public void setFactory(String factory) {
		this.factory = factory;
	}
	
	@NotBlank(message="轮胎尺寸不能为空")
	@Length(min=0, max=100, message="轮胎尺寸长度不能超过 100 个字符")
	public String getTireSize() {
		return tireSize;
	}

	public void setTireSize(String tireSize) {
		this.tireSize = tireSize;
	}
	
	@NotBlank(message="座位数不能为空")
	@Length(min=0, max=100, message="座位数长度不能超过 100 个字符")
	public String getSeatNumber() {
		return seatNumber;
	}

	public void setSeatNumber(String seatNumber) {
		this.seatNumber = seatNumber;
	}
	
	@NotBlank(message="里程数不能为空")
	@Length(min=0, max=100, message="里程数长度不能超过 100 个字符")
	public String getMilage() {
		return milage;
	}

	public void setMilage(String milage) {
		this.milage = milage;
	}
	
	@Length(min=0, max=100, message="TT付款单号长度不能超过 100 个字符")
	public String getPaymentOrderCode() {
		return paymentOrderCode;
	}

	public void setPaymentOrderCode(String paymentOrderCode) {
		this.paymentOrderCode = paymentOrderCode;
	}
	
	public OverseasWarehouse getOverseasWarehouseId() {
		return overseasWarehouseId;
	}

	public void setOverseasWarehouseId(OverseasWarehouse overseasWarehouseId) {
		this.overseasWarehouseId = overseasWarehouseId;
	}

    public Tcar getTcar() {
        return tcar;
    }

    public void setTcar(Tcar tcar) {
        this.tcar = tcar;
    }

    public String getWarehousestatus() {
        return warehousestatus;
    }

    public void setWarehousestatus(String warehousestatus) {
        this.warehousestatus = warehousestatus;
    }

    public String getCarName() {
        return carName;
    }

    public void setCarName(String carName) {
        this.carName = carName;
    }

    public String getFrameNumberOld() {
        return frameNumberOld;
    }

    public void setFrameNumberOld(String frameNumberOld) {
        this.frameNumberOld = frameNumberOld;
    }
}